package com.tuanzi.loan.web.lazy.family.largeAmount;

import com.tuanzi.loan.business.service.family.LargeNewDeliveryService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.largeamount.LargeNewDeliveryRequest;
import com.tuanzi.loan.vo.response.family.largeamount.LargeNewDeliveryResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 11:00 2019/7/9
 * Description:
 */
public class LargeNewDeliveryListLazyDataModel extends BaseLazyDataModel<LargeNewDeliveryRequest, LargeNewDeliveryResponse> {

    private static final long serialVersionUID = 3773323347941084504L;

    private LargeNewDeliveryService largeNewDeliveryService = SpringContextHolder.getBean(LargeNewDeliveryService.class);

    public LargeNewDeliveryListLazyDataModel(LargeNewDeliveryRequest largeNewDeliveryRequest) {
        super(largeNewDeliveryRequest);
    }

    @Override
    protected Page<LargeNewDeliveryResponse> doLoad(PageSearcher<LargeNewDeliveryRequest> pageSearcher) {
        return largeNewDeliveryService.list(pageSearcher);
    }
}
